You are here: Scripting examples > Using variables to create and connect a replication set and run verification

Using variables to create and connect a replication set and run verification

The following script uses variables to identify the source, target, and replication set. These variables are then used in the scripting commands. The $connectionID variable will contain the connection ID for the connection established. This variable can then be used to establish a verification schedule.

$TheTarget = "beta";

$TheSource = "alpha";

$TheRepset = "DataFiles";

source $TheSource;

repset create $TheRepset;

repset rule add c:\files include, recursive;

repset rule add c:\files\users exclude;

repset rule add d:\data include, recursive;

repset save;

$ConnectionID = connect $TheRepset to $TheTarget map exact;

verify $ConnectionID sync, newer, checksum, every 12 hr;